import {
  fromJS
} from 'immutable'
import {
  LOGIN_INFO
} from './constants'
const defaultState = fromJS({
  login: false
})
export default (state = defaultState, action) => {
  switch (action.type) {
    case LOGIN_INFO:
      return state.set('login', action.login)
    default:
      return state
  }
}